﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Aker.DevTeam;
using Extensions;

namespace Aker.Order
{
    public partial class Customer : XForm
    {
        public Customer()
        {
            InitializeComponent();
        }

        private void Customer_Load(object sender, EventArgs e)
        {
            Data.TAM.CustomerTableAdapter.Fill(Data.DB.Customer);
            gv.Init(Data.bsCustomer);
            gv.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.Bottom;
           

            //this.Text = Language.Customers.Header;
            //btnKaydet.Caption = Language.Save;
            //gv.ViewCaption = Language.Customers.Customer;

            //if (AppSession.Language == "TR")
                gv.SetCaptions("CustomerId:#","Contact:Yetkili","Brand:Marka","eMail:e-posta","Phone:Telefon","Fax:Faks","Address:Adres");
            //else
            //    gv.SetCaptions("CustomerId:#", "eMail:e-mail");

            gv.BestFitColumns();
        }

        private void btnKaydet_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            gv.EndEditing();
            Data.TAM.CustomerTableAdapter.Update(Data.DB.Customer); 
        }
 
    }
}
